package com.crm.dao.mapper.customMapper.sendRoyaltyManager;

import com.crm.model.entity.sendRoyaltyManager.OrderSendRoyalty;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * @Author: chaifuyou
 * @date 2021/4/7 14:26
 */
public interface SendRoyaltyMapper {

    /**
     * 查询提成方法次数
     * @param productOrderId
     * @param productId
     * @return
     */
    Integer getSendRoyaltyNum(@Param("orderId") String productOrderId, @Param("productId")String productId);

    /**
     * 根据订单id、产品id逻辑删除提成发放记录
     * @param orderSendRoyalty
     */
    void delSendRoyalty(OrderSendRoyalty orderSendRoyalty);

    /**
     * 获取提成发放详情
     * @param orderSendRoyalty
     * @return
     */
    OrderSendRoyalty getSendRoyaltyInfo(OrderSendRoyalty orderSendRoyalty);

    /**
     * 获取最后一次发放的时间
     * @param orderId
     * @return
     */
    Date getMaxCreateTime(@Param("orderId")String orderId);
}
